import request from '@/utils/request'

export const EXPORT_URL = "system/new/exportoperator";

// 查询列表
export function listOperator(query) {
  return request({
    url: '/system/eaOperator/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getEaOperator(id) {
  return request({
    url: '/system/eaOperator/' + id,
    method: 'get'
  })
}

// 新增
export function addOperator(data) {
  return request({
    url: '/system/eaOperator',
    method: 'post',
    data: data
  })
}

// 修改
export function updateOperator(data) {
  return request({
    url: '/system/eaOperator',
    method: 'put',
    data: data
  })
}

// 状态修改
// export function changeOperatorStatus(id, status) {
//   const data = {
//     id,
//     status
//   }
//   return request({
//     url: '/system/role/changeStatus',
//     method: 'put',
//     data: data
//   })
// }

// 删除
export function delOperator(ids) {
  return request({
    url: '/system/eaOperator/' + ids,
    method: 'delete'
  })
}

// 获取所有运营商
export function optionSelect(query) {
  return request({
    url: '/system/eaOperator/optionSelect',
    method: 'get',
    params: query
  })
}

// 运营商选择列表
export function eaOperatSelect(query) {
  return request({
    url: '/system/eaOperator/optionSelect',
    method: 'get',
    params: query
  })
}
